﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
    <%IPMS.Models.Package package = (IPMS.Models.Package)ViewData["Package"]; %>
    <div id="main">
        <div id="m-top">
            <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/email.png" alt="inviting" width="50px"/>
            <h4>Danh sách thông tin mời thầu</h4>
            <div id="action">
                <a href="<%: IPMS.Library.Helper.GetActionLink("inviting/create", "package", package.ID)%>" title="Thêm thông tin mời thầu">
                    <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/add1.png" alt="Thêm TTMT"/>
                </a>
            </div>
        </div><!--end of m-top-->
        <div id="info" style="height: 150px;">
            <%
               if (package != null)
               { %>
            <div>Tên kế hoạch: <%: package.Project.Plan.Name%></div>
            <div>Năm: <%: package.Project.Plan.Year%></div>
            <div>Tên dự án: <%: package.Project.Name%></div>
            <div>Đơn vị: <%: package.Project.Department.Name%></div>
            <div>Số QĐ: <%: package.Project.Number%></div>
            <div>Ngày QĐ: <%: String.Format("{0:dd/MM/yyyy}", package.Project.DecisionDate)%></div>
            <div>Tên gói thầu: <%: package.Name %></div>
            <div>Số QĐ: <%: package.DecisionNumber %></div>
            <div>Ngày QĐ: <%: String.Format("{0:dd/MM/yyyy}", package.DecisionDate) %></div>
            <%}
               else
               { %>
               <h5 class="warning">Gói thầu không tồn tại</h5>
            <%} %>
        </div><!--end of div#info-->
        <div id="list">
                <div class="heading">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkAll" id="chkAll" value="0"/>
                    </div>  
                    <div style="width:25%;">
                        Số QĐ
                    </div>
                    <div style="width:10%;">
                        Ngày QĐ
                    </div>
                    <div style="width:10%;">
                        Ngày trình
                    </div>
                    <div style="width:10%">
                        Ngày mời thầu
                    </div>
                    <div style="width: 15%;">
                        HSMT
                    </div>
                    <div style="width:12%;">Phê duyệt</div>
                    <div style="width:15%;">Thao tác</div>
                </div><!--end of #list .heading -->
                <%
                    int index = 1;
                    if (((List<IPMS.Models.BiddingInviting>)Model).Count == 0)
                    {
                %>
                    <div class="row last">Chưa có dữ liệu!</div>
                <%
                    }
                    else
                    {
                        foreach (IPMS.Models.BiddingInviting inviting in Model)
                        {
                 %>
                 <div class="row <%: (index==Model.Count)? "last" : ""%>">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkID" value="<%:inviting.ID %>"/>
                    </div>  
                    <div style="width:25%;">
                        <%: inviting.Number%>
                    </div>
                    <div style="width:10%;">
                        <%: String.Format("{0:dd/MM/yyyy}", inviting.AprrovedDate)%>
                    </div>
                    <div style="width:10%;">
                        <%: String.Format("{0:dd/MM/yyyy}", inviting.PresentedDate)%>
                    </div>
                    <div style="width:10%;">
                        <%: String.Format("{0:dd/MM/yyyy}", inviting.InvitingDate)%>
                    </div>
                    <div style="width: 15%">
                        <a href="<%:inviting.DocumentURL %>">Tải về</a>
                    </div>
                    <div style="width:12%;">
                        <%if (inviting.Approved.Value)
                          {
                        %>
                        <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/actived.png" alt="Yes"/>
                        <%
}
                          else
                          { %>5
                          <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/noactived.png" alt="No"/>
                        <%
}
                        %>
                    </div>
                    <div style="width:15%;">
                        <a href="<%: IPMS.Library.Helper.GetActionLink("inviting/edit", "package", inviting.ID)%>" title="Chỉnh sửa thông tin">
                            <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/edit.png" alt="Sửa"/>
                        </a>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("inviting/delete", "package", inviting.ID)%>" title="Xóa Tài khoản">
                            <img src="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/images/delete1.png" alt="Xóa"/>
                        </a>
                    </div>
                </div><!--end of #list .row -->
                 
                 <%
                        index++;
                        }
                    }
                 %>
                
               
            </div><!--end of list -->
            <div style="clear:both;"></div>
    </div>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    IPMS > Danh sách thông tin mời thầu
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CSS" runat="server">
    <link href="<%:IPMS.Library.Helper.GetDomainURL()%>/Content/css/list.css" rel="stylesheet" type="text/css" />
</asp:Content>
